﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using ControlAccessUser.Bussiness;
using ControlAccessUser.Model;

namespace ControlAccessUser.Presenter
{
    
    public class PresenterPrincipal
    {
        IPrincipalView View;
        
        public PresenterPrincipal(IPrincipalView View)
        {
            this.View = View;
        }

        public void Logout()
        {
            if (View.UserReallyGoOut)
            {                
                ManagerUser.RegisterLogout(View.UserLogin);
                View.Logout();
            }
        }
        public void RegisterUser()
        {
            View.GoRegisterUser();
        }

        public void GoSearchUser(User User)
        {
            View.GoSearchUser(User);
        }
    }
}
